<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php echo $this->Html->charset(); ?>
        <title>
            <?php echo $title_for_layout; ?>
        </title>
        <?php
        # Import styling files.
        echo $this->Html->meta('icon');
        echo $this->Html->script(array('jquery-1.7.2.min',
            'jquery-ui-1.8.19.custom.min', 'bootstrap.min'));
        echo $this->Html->css(array('bootstrap.min', 'jquery-ui-1.8.19.custom.css'));

        # Fetch imported files.
        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
        ?>

        <!-- Le styles -->
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
			.act{
                        -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
                        -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
                        box-shadow:inset 0px 1px 0px 0px #ffffff;
                        background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #E2E2E2), color-stop(1, #B8B8B8) );
                        background:-moz-linear-gradient( center top, #5ac5fa 5%, #3669c2 100% );
                        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5ac5fa', endColorstr='#3669c2');
                        background-color:#5ac5fa;
                        -moz-border-radius:6px;
                        -webkit-border-radius:6px;
                        border-radius:6px;
                        border:1px solid #4a569e;
                        display:inline-block;

                        font-family:arial;

                        font-weight:bold;

                        padding:6px 12px;
                        text-decoration:none;
                    }
                    .act1{
                        -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
                        -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
                        box-shadow:inset 0px 1px 0px 0px #ffffff;
                        background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4869AF), color-stop(1, #083AB9) );
                        background:-moz-linear-gradient( center top, #5ac5fa 5%, #3669c2 100% );
                        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5ac5fa', endColorstr='#3669c2');
                        background-color:#5ac5fa;
                        -moz-border-radius:6px;
                        -webkit-border-radius:6px;
                        border-radius:6px;
                        border:1px solid #4a569e;
                        display:inline-block;

                        font-family:arial;

                        font-weight:bold;

                        padding:6px 12px;
                        text-decoration:none;
                    }
        </style>
        <?php echo $this->Html->css('bootstrap.min'); ?>
    </head>

    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a><!--btn-navbar-->
                    <a class="brand" href="http://tattlr.com">Tattlr</a>
                    <div class="nav-collapse">
                        <ul class="nav">
                            <li><?php echo $this->Html->link('<i class ="icon-arrow-left icon-white" >' . '</i>', array('controller' => 'Users', 'action' => 'index'), array('escape' => false)); ?></li>
                            
                            <li><?php echo $this->Html->link('Manage Accounts', array('controller' => 'tattlraccounts', 'action' => 'index')); ?></li>
                            <li><?php echo $this->Html->link('Manage Users', array('controller' => 'Users', 'action' => 'manage')); ?></li>
                            
                            <li><?php echo $this->Html->link('View history', array('controller' => 'Posts', 'action' => 'pages')); ?></li>
                            <li><?php echo $this->Html->link('Logout', array('controller' => 'Users', 'action' => 'logout')); ?></li>
                        </ul>
                    </div> 
                </div><!--container-->
            </div><!--.navbar-inner-->
        </div><!--navbar-->

        <div class ="container-fluid">
            <div class ="row-fluid">
                <div class="span3">
				<?php echo $this->fetch('leftmenu'); ?>  
                </div>
                <div class="span6">
                    <?php echo $this->Session->flash(); ?>
                    <?php echo $this->Session->flash('auth'); ?>

                    <?php echo $this->fetch('content'); ?>
                </div><!--span6-->
                <div class="span3 offset4">
                    <?php if ($accountsLeftBox == 'true') { ?>
                        <div class="well pull-right">
                            <ul class="nav nav-list">

                                 Accounts
                                            </li><?php for ($i = 0; $i < count($accounts); $i++) { ?>  <?php
                                        echo $this->Form->create('tattlrAccount', array('action' => 'selectAccount'));
                                        echo $this->Form->hidden('Account', array('value' => $accounts[$i]));
                                       if ($currentlySelectedAccount == $accounts[$i]) {
                                        ?><li class="act1"><?php } else { ?><li class="act"><?php } ?> <?php
                                        echo $this->Form->submit($images[$i]) . "" . $accounts[$i];
                                        echo $this->Form->end();
                                    ?> </li> <?php
                                            }
                                ?>
                            </ul>
                        </div>
                    <?php } ?>
                </div><!--span3-->
                </body>
                </html>
